package com.ruoyi.transaction.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 商品SKU对象 sku
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
public class Sku extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** SKU ID（库存单位） */
    @Excel(name = "SKU ID", readConverterExp = "库=存单位")
    private Long id;

    /** 所属商品SPU ID */
    @Excel(name = "所属商品SPU ID")
    private Long spuId;

    /** 规格信息（JSON格式，如{"容量":"500ml","包装":"瓶装"}） */
    @Excel(name = "规格信息", readConverterExp = "J=SON格式")
    private String spec;

    /** 商品条形码（用于扫码销售） */
    @Excel(name = "商品条形码", readConverterExp = "用=于扫码销售")
    private String barcode;

    /** 销售价格（单位：元） */
    @Excel(name = "销售价格", readConverterExp = "单=位：元")
    private BigDecimal price;

    /** 商品成本价（用于利润分析） */
    @Excel(name = "商品成本价", readConverterExp = "用=于利润分析")
    private BigDecimal costPrice;

    /** 商品展示图URL */
    @Excel(name = "商品展示图URL")
    private String imageUrl;

    /** 是否上架（0-下架，1-上架） */
    @Excel(name = "是否上架", readConverterExp = "0=-下架，1-上架")
    private String isActive;

    /** 删除标志（0-未删除，1-已删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setSpuId(Long spuId) 
    {
        this.spuId = spuId;
    }

    public Long getSpuId() 
    {
        return spuId;
    }

    public void setSpec(String spec) 
    {
        this.spec = spec;
    }

    public String getSpec() 
    {
        return spec;
    }

    public void setBarcode(String barcode) 
    {
        this.barcode = barcode;
    }

    public String getBarcode() 
    {
        return barcode;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setCostPrice(BigDecimal costPrice) 
    {
        this.costPrice = costPrice;
    }

    public BigDecimal getCostPrice() 
    {
        return costPrice;
    }

    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }

    public void setIsActive(String isActive) 
    {
        this.isActive = isActive;
    }

    public String getIsActive() 
    {
        return isActive;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("spuId", getSpuId())
            .append("spec", getSpec())
            .append("barcode", getBarcode())
            .append("price", getPrice())
            .append("costPrice", getCostPrice())
            .append("imageUrl", getImageUrl())
            .append("isActive", getIsActive())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
